<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('列表')" />
</head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								编号：<input type="text" name="code"/>
							</li>

							<li>
								渠道编号：<input type="text" name="chCode"/>
							</li>

							<li>
								商户编号：<input type="text" name="mchCode"/>
							</li>

							<li>
								代付金额：<input type="text" name="fee"/>
							</li>

							<li>
								：<input type="text" name="chFee"/>
							</li>

							<li>
								：<input type="text" name="mchFee"/>
							</li>

							<li>
								：<input type="text" name="finFee"/>
							</li>

							<li>
								开始时间：<input type="text" name="begin"/>
							</li>

							<li>
								结束时间：<input type="text" name="end"/>
							</li>

							<li>
								交易状态：0未到账，1已到账，2支付失败：<input type="text" name="status"/>
							</li>

							<li>
								：<input type="text" name="merchantId"/>
							</li>

							<li>
								：<input type="text" name="merchantName"/>
							</li>

							<li>
								：<input type="text" name="merchantCode"/>
							</li>

							<li>
								：<input type="text" name="channelId"/>
							</li>

							<li>
								：<input type="text" name="channelName"/>
							</li>

							<li>
								：<input type="text" name="channelCode"/>
							</li>

							<li>
								：<input type="text" name="channelWithdrawalFee"/>
							</li>

							<li>
								：<input type="text" name="channelMchWithdrawalFee"/>
							</li>

							<li>
								：<input type="text" name="walletKindId"/>
							</li>

							<li>
								：<input type="text" name="walletKindName"/>
							</li>

							<li>
								：<input type="text" name="walletKindCode"/>
							</li>

							<li>
								：<input type="text" name="bankId"/>
							</li>

							<li>
								：<input type="text" name="bankCode"/>
							</li>

							<li>
								：<input type="text" name="bankStatus"/>
							</li>

							<li>
								：<input type="text" name="bankBranch"/>
							</li>

							<li>
								：<input type="text" name="bankSubBranch"/>
							</li>

							<li>
								：<input type="text" name="bankProvince"/>
							</li>

							<li>
								：<input type="text" name="bankCity"/>
							</li>

							<li>
								：<input type="text" name="bankUnionNo"/>
							</li>

							<li>
								：<input type="text" name="bankCardOwner"/>
							</li>

							<li>
								：<input type="text" name="bankCardNo"/>
							</li>

							<li>
								回调地址：<input type="text" name="callbackUrl"/>
							</li>

							<li>
								渠道回调状态：<input type="text" name="channelNotifyStatus"/>
							</li>

							<li>
								：<input type="text" name="merchantNotifyStatus"/>
							</li>

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="transaction:withdrawal:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="transaction:withdrawal:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="transaction:withdrawal:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="transaction:withdrawal:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('transaction:withdrawal:edit')}]];
        var removeFlag = [[${@permission.hasPermi('transaction:withdrawal:remove')}]];
        var prefix = ctx + "transaction/withdrawal";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "",
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'id', 
					title : '标识',
					visible: false
				},
				{
					field : 'code', 
					title : '编号',
					sortable: true
				},
				{
					field : 'chCode', 
					title : '渠道编号',
					sortable: true
				},
				{
					field : 'mchCode', 
					title : '商户编号',
					sortable: true
				},
				{
					field : 'fee', 
					title : '代付金额',
					sortable: true
				},
				{
					field : 'chFee', 
					title : '',
					sortable: true
				},
				{
					field : 'mchFee', 
					title : '',
					sortable: true
				},
				{
					field : 'finFee', 
					title : '',
					sortable: true
				},
				{
					field : 'begin', 
					title : '开始时间',
					sortable: true
				},
				{
					field : 'end', 
					title : '结束时间',
					sortable: true
				},
				{
					field : 'status', 
					title : '交易状态：0未到账，1已到账，2支付失败',
					sortable: true
				},
				{
					field : 'merchantId', 
					title : '',
					sortable: true
				},
				{
					field : 'merchantName', 
					title : '',
					sortable: true
				},
				{
					field : 'merchantCode', 
					title : '',
					sortable: true
				},
				{
					field : 'channelId', 
					title : '',
					sortable: true
				},
				{
					field : 'channelName', 
					title : '',
					sortable: true
				},
				{
					field : 'channelCode', 
					title : '',
					sortable: true
				},
				{
					field : 'channelWithdrawalFee', 
					title : '',
					sortable: true
				},
				{
					field : 'channelMchWithdrawalFee', 
					title : '',
					sortable: true
				},
				{
					field : 'walletKindId', 
					title : '',
					sortable: true
				},
				{
					field : 'walletKindName', 
					title : '',
					sortable: true
				},
				{
					field : 'walletKindCode', 
					title : '',
					sortable: true
				},
				{
					field : 'bankId', 
					title : '',
					sortable: true
				},
				{
					field : 'bankCode', 
					title : '',
					sortable: true
				},
				{
					field : 'bankStatus', 
					title : '',
					sortable: true
				},
				{
					field : 'bankBranch', 
					title : '',
					sortable: true
				},
				{
					field : 'bankSubBranch', 
					title : '',
					sortable: true
				},
				{
					field : 'bankProvince', 
					title : '',
					sortable: true
				},
				{
					field : 'bankCity', 
					title : '',
					sortable: true
				},
				{
					field : 'bankUnionNo', 
					title : '',
					sortable: true
				},
				{
					field : 'bankCardOwner', 
					title : '',
					sortable: true
				},
				{
					field : 'bankCardNo', 
					title : '',
					sortable: true
				},
				{
					field : 'callbackUrl', 
					title : '回调地址',
					sortable: true
				},
				{
					field : 'channelNotifyStatus', 
					title : '渠道回调状态',
					sortable: true
				},
				{
					field : 'merchantNotifyStatus', 
					title : '',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>